package org.cjprods.ars;

import java.lang.annotation.*;

public class annotations
{
    @Target(ElementType.METHOD)
    @Retention(RetentionPolicy.RUNTIME)
    static public @interface path
    {
        String value();
    }

    @Target(ElementType.METHOD)
    @Retention(RetentionPolicy.RUNTIME)
    static public @interface post
    {
    }

    @Target(ElementType.METHOD)
    @Retention(RetentionPolicy.RUNTIME)
    static public @interface token
    {
        String[] roles() default {};
    }

    /**
    values: "name" = fill from arg("name");
            "$name" = fill from make_credential(arg("name"));
            "#" = fill from user id
    */
    @Target(ElementType.METHOD)
    @Retention(RetentionPolicy.RUNTIME)
    static public @interface sql
    {
        String func();
        String[] values() default {};
        String[] results() default {};
        boolean multi() default false;
    }

    @Target(ElementType.PARAMETER)
    @Retention(RetentionPolicy.RUNTIME)
    static public @interface result
    {
        String value();
    }

    @Target(ElementType.PARAMETER)
    @Retention(RetentionPolicy.RUNTIME)
    static public @interface arg
    {
        String value();
    }
}

